/* 基础样式重置 */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    line-height: 1.2;
}

body {
    font-family: 'Noto Sans SC', 'Noto Sans', 'PingFang SC', 'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    padding: 20px;
    background-color: #f5f7fa;
    color: #333;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.05);
}

h1 {
    text-align: center;
    margin-bottom: 40px;
    color: #1a365d;
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

h2 {
    font-size: 1.4rem;
    margin-bottom: 20px;
    color: #2c5282;
    font-weight: 600;
}

h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
    color: #2c5282;
    font-weight: 600;
}

/* 自定义通知 */
.save-notification {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 12px 25px;
    background-color: rgba(49, 130, 206, 0.95);
    color: white;
    border-radius: 8px;
    z-index: 1000;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(49, 130, 206, 0.3);
    font-weight: 500;
}

/* 队伍选择面板 */
.panel {
    background-color: #ffffff;
    border-radius: 12px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    border: 1px solid rgba(226, 232, 240, 0.8);
}

.team-selector-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.team-selector-group {
    display: flex;
    align-items: center;
    gap: 15px;
}

.team-selector {
    flex: 1;
    padding: 12px 15px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1.05rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    transition: all 0.2s ease;
}

.team-selector:focus {
    border-color: #4299e1;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.2);
    outline: none;
}

.buttons-container {
    display: flex;
    justify-content: space-between;
    margin-top: 25px;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.6);
    backdrop-filter: blur(3px);
}

.modal-content {
    background-color: #fff;
    margin: 8% auto;
    padding: 30px;
    border-radius: 12px;
    width: 55%;
    max-width: 550px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from { opacity: 0; transform: translateY(-20px); }
    to { opacity: 1; transform: translateY(0); }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #edf2f7;
    padding-bottom: 15px;
    margin-bottom: 20px;
}

.close {
    color: #a0aec0;
    font-size: 30px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s;
}

.close:hover {
    color: #2d3748;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #4a5568;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-sizing: border-box;
    font-size: 1rem;
    transition: all 0.2s;
}

.form-group input:focus {
    border-color: #4299e1;
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.2);
    outline: none;
}

.form-group small {
    display: block;
    color: #718096;
    font-size: 0.9rem;
    margin-top: 6px;
}

/* 按钮样式 */
.btn {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    background-color: #edf2f7;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    margin-right: 12px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.btn:hover {
    background-color: #e2e8f0;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.12);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background-color: #4a90e2;
    color: white;
}

.btn-primary:hover {
    background-color: #3a80d2;
}

/* 比赛对阵图样式 */
.tournament-bracket {
    width: 100%;
    margin: 0 auto 70px;
    padding: 30px 0;
}

.bracket-container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: nowrap;
    gap: 40px;
    padding: 30px 15px;
    position: relative;
}

.bracket-side {
    width: 22%;
    display: flex;
    flex-direction: column;
}

.left-bracket {
    order: 1;
}

.semifinal-left {
    order: 2;
    width: 18%;
    margin-top: 120px;
}

.final-container {
    order: 3;
    width: 20%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-top: 240px;
}

.semifinal-right {
    order: 4;
    width: 18%;
    margin-top: 120px;
}

.right-bracket {
    order: 5;
    width: 22%;
}

.round {
    margin-bottom: 50px;
    width: 100%;
}

.matches {
    display: flex;
    flex-direction: column;
    gap: 40px;
}

.match, .final-match {
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    padding: 20px;
    position: relative;
    border: 1px solid rgba(226, 232, 240, 0.8);
    transition: all 0.3s ease;
}

.match:hover, .final-match:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
    transform: translateY(-3px);
}

.final-match {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.vs {
    text-align: center;
    font-weight: bold;
    color: #a0aec0;
    margin: 15px 0;
    font-size: 1.1rem;
    letter-spacing: 1px;
}

/* 球队卡片样式 - 现代版 */
.team-card {
    display: flex;
    align-items: center;
    padding: 18px;
    border-radius: 10px;
    margin-bottom: 15px;
    background-color: #f8fafc;
    cursor: pointer;
    border: 1px solid #e2e8f0;
    position: relative;
    transition: all 0.25s ease;
}

.team-card:last-child {
    margin-bottom: 0;
}

.team-card.selected, .team-card.winner {
    background-color: #ebf8ff;
    border-left: 5px solid #3182ce;
    font-weight: bold;
}

.team-card:hover {
    background-color: #e6f7ff;
    border-color: #90cdf4;
    box-shadow: 0 5px 10px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.team-logo {
    width: 48px;
    height: 48px;
    margin-right: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 1px solid #edf2f7;
    border-radius: 50%;
    background-color: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    overflow: hidden;
}

.team-logo img {
    max-width: 85%;
    max-height: 85%;
    object-fit: contain;
}

.text-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    font-weight: bold;
    border-radius: 50%;
    font-size: 1.2rem;
}

.team-name {
    flex-grow: 1;
    font-weight: 600;
    font-size: 1.35rem;
    padding: 6px 10px;
    border-radius: 6px;
    min-height: 36px;
    border: 1px dashed transparent;
    cursor: text;
    position: relative;
    z-index: 5;
    transition: all 0.2s ease;
}

.team-name:hover, .team-name:focus {
    border-color: #cbd5e0;
    background-color: #fff;
    outline: none;
}

.team-name:focus {
    border-color: #3182ce;
    box-shadow: 0 0 0 2px rgba(49, 130, 206, 0.2);
}

/* 添加一个提示元素，明确指示队名可编辑 */
.team-name::after {
    content: '编辑';
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 11px;
    color: #a0aec0;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.team-name:hover::after {
    opacity: 1;
}

/* 冠军展示 */
#champion {
    margin-top: 70px;
    padding-top: 50px;
    position: relative;
    text-align: center;
}

#champion::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    width: 2px;
    height: 50px;
    background-color: #cbd5e0;
}

.champion-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: #fff;
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    animation: championPulse 2s infinite alternate;
    border: 2px solid #3182ce;
}

@keyframes championPulse {
    from { box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15); }
    to { box-shadow: 0 15px 35px rgba(49, 130, 206, 0.3); }
}

.champion-logo {
    width: 80px;
    height: 80px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 2px solid #edf2f7;
    overflow: hidden;
    background-color: #fff;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.champion-name {
    font-size: 1.8rem;
    font-weight: bold;
    color: #2c5282;
    margin-top: 10px;
}

.champion-title {
    font-size: 1.2rem;
    margin-bottom: 15px;
    color: #4a5568;
    background-color: #ebf8ff;
    padding: 8px 20px;
    border-radius: 30px;
    font-weight: 600;
    box-shadow: 0 2px 5px rgba(66, 153, 225, 0.2);
}

/* 控制按钮 */
.controls {
    text-align: center;
    margin-top: 40px;
    margin-bottom: 50px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
}

.controls button {
    margin: 0;
    padding: 14px 25px;
    font-size: 1.1rem;
    border: none;
    border-radius: 10px;
    background: linear-gradient(145deg, #3182ce, #4299e1);
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(66, 153, 225, 0.3);
    font-weight: 600;
}

.controls button:hover {
    background: linear-gradient(145deg, #2a6cb0, #3182ce);
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(66, 153, 225, 0.4);
}

.controls button:active {
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(66, 153, 225, 0.3);
}

.controls button:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(49, 130, 206, 0.4), 0 4px 10px rgba(66, 153, 225, 0.3);
}

/* 说明区域 */
.instructions {
    background-color: #fff;
    border-radius: 12px;
    padding: 30px;
    margin-top: 50px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(226, 232, 240, 0.8);
}

.instructions p {
    margin-bottom: 12px;
    line-height: 1.6;
    font-size: 1.05rem;
}

.instructions strong {
    color: #3182ce;
}

/* 页脚 */
footer {
    margin-top: 50px;
    text-align: center;
    color: #718096;
    font-size: 0.95rem;
    padding: 20px 0;
    border-top: 1px solid #edf2f7;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .bracket-container {
        flex-direction: column;
        align-items: center;
        gap: 30px;
    }
    
    .bracket-side, .semifinal-left, .final-container, .semifinal-right {
        width: 85%;
        margin-top: 0;
        order: unset;
    }
    
    .round {
        margin-bottom: 40px;
    }
}

@media (max-width: 600px) {
    .bracket-side, .semifinal-left, .final-container, .semifinal-right {
        width: 100%;
    }
    
    .team-card {
        padding: 12px;
    }
    
    .team-logo {
        width: 40px;
        height: 40px;
        margin-right: 12px;
    }
    
    .team-name {
        font-size: 1.2rem;
    }
    
    .modal-content {
        width: 95%;
    }
    
    .controls button {
        width: 100%;
        margin-bottom: 10px;
    }
}

/* 半决赛区域样式 */
.semifinal-left, .semifinal-right {
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* 球队卡片在不同区域的样式调整 */
.left-bracket .match,
.semifinal-left .match {
    border-right: 2px solid #e2e8f0;
    padding-right: 20px;
    position: relative;
}

.right-bracket .match,
.semifinal-right .match {
    border-left: 2px solid #e2e8f0;
    padding-left: 20px;
    position: relative;
}

/* 添加连接线 */
/* 左侧8强到半决赛 */
.left-bracket .match::after {
    content: '';
    position: absolute;
    right: -25px;
    top: 50%;
    width: 25px;
    height: 2px;
    background-color: #cbd5e0;
}

/* 右侧8强到半决赛 */
.right-bracket .match::after {
    content: '';
    position: absolute;
    left: -25px;
    top: 50%;
    width: 25px;
    height: 2px;
    background-color: #cbd5e0;
}

/* 左侧半决赛到决赛 */
.semifinal-left .match::after {
    content: '';
    position: absolute;
    right: -25px;
    top: 50%;
    width: 25px;
    height: 2px;
    background-color: #cbd5e0;
}

/* 右侧半决赛到决赛 */
.semifinal-right .match::after {
    content: '';
    position: absolute;
    left: -25px;
    top: 50%;
    width: 25px;
    height: 2px;
    background-color: #cbd5e0;
}

/* 添加一个明显的占位符样式 */
.placeholder-logo {
    background-color: #f7fafc;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #a0aec0;
    font-size: 11px;
    text-align: center;
    border-radius: 50%;
}

/* 分享按钮样式 */
.share-buttons {
    margin-top: 25px;
    text-align: center;
    background-color: #f7fafc;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.share-buttons h4 {
    margin-bottom: 15px;
    color: #4a5568;
    font-size: 1.1rem;
}

.share-btn {
    padding: 12px 20px;
    margin: 0 8px;
    border: none;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s;
}

/* 为不同的社交媒体平台设置不同颜色 */
#shareToWeChat {
    background: linear-gradient(145deg, #07C160, #09d66a);
    color: white;
}

#shareToWeibo {
    background: linear-gradient(145deg, #E6162D, #ff1a33);
    color: white;
}

#shareToBilibili {
    background: linear-gradient(145deg, #FB7299, #ff8aa8);
    color: white;
}

#cancelShare {
    background: linear-gradient(145deg, #718096, #a0aec0);
    color: white;
}

.share-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* 分享模态框样式 */
#share-modal .modal-content {
    max-width: 700px;
    width: 90%;
}

#share-image-container {
    max-width: 100%;
    overflow: auto;
    border: 1px solid #edf2f7;
    padding: 15px;
    background-color: #f7fafc;
    border-radius: 8px;
}

#share-image-container img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
}

.share-instructions {
    margin-top: 25px;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 20px;
}

.share-platform {
    flex: 1;
    min-width: 200px;
    padding: 15px;
    border: 1px solid #edf2f7;
    border-radius: 10px;
    background-color: #f8fafc;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.share-platform h4 {
    margin-bottom: 12px;
    color: #4a5568;
    font-size: 1.05rem;
    padding-bottom: 8px;
    border-bottom: 1px solid #edf2f7;
}

.share-platform ol {
    padding-left: 25px;
    margin: 0;
}

.share-platform li {
    margin-bottom: 8px;
    font-size: 0.95rem;
    line-height: 1.5;
}

#download-share-image {
    padding: 14px 25px;
    font-size: 1.05rem;
    background: linear-gradient(145deg, #3182ce, #4299e1);
    box-shadow: 0 4px 10px rgba(66, 153, 225, 0.3);
}

#download-share-image:hover {
    background: linear-gradient(145deg, #2a6cb0, #3182ce);
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(66, 153, 225, 0.4);
}

/* 为保存为图片按钮添加显著的样式 */
#saveAsImage {
    background: linear-gradient(145deg, #38A169, #48BB78);
    box-shadow: 0 4px 10px rgba(56, 161, 105, 0.3);
}

#saveAsImage:hover {
    background: linear-gradient(145deg, #2F855A, #38A169);
    box-shadow: 0 6px 15px rgba(56, 161, 105, 0.4);
}

/* 重置和导出文本按钮 */
#resetPredictions {
    background: linear-gradient(145deg, #E53E3E, #F56565);
    box-shadow: 0 4px 10px rgba(229, 62, 62, 0.3);
}

#resetPredictions:hover {
    background: linear-gradient(145deg, #C53030, #E53E3E);
    box-shadow: 0 6px 15px rgba(229, 62, 62, 0.4);
}

#exportPredictions {
    background: linear-gradient(145deg, #805AD5, #9F7AEA);
    box-shadow: 0 4px 10px rgba(128, 90, 213, 0.3);
}

#exportPredictions:hover {
    background: linear-gradient(145deg, #6B46C1, #805AD5);
    box-shadow: 0 6px 15px rgba(128, 90, 213, 0.4);
}

/* 保存预测按钮 */
#savePredictions {
    background: linear-gradient(145deg, #3182CE, #4299E1);
    box-shadow: 0 4px 10px rgba(49, 130, 206, 0.3);
}

#savePredictions:hover {
    background: linear-gradient(145deg, #2B6CB0, #3182CE);
    box-shadow: 0 6px 15px rgba(49, 130, 206, 0.4);
}

/* 通知样式 */
.notification {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 12px 24px;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    z-index: 1000;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    animation: fadeInUp 0.3s ease-out;
}

.notification.success {
    background-color: rgba(56, 161, 105, 0.95);
}

.notification.error {
    background-color: rgba(229, 62, 62, 0.95);
}

.notification.warning {
    background-color: rgba(221, 107, 32, 0.95);
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translate(-50%, 20px);
    }
    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

/* 移动设备样式 */
@media (max-width: 768px) {
    .team-name {
        font-size: 1.2rem;
    }
} 